CC       = gcc
CXX      = g++

FLAGS    = -O3

NAME     = ppr-glut

PATHINC  = -I../lcgtk/glslKernel -I../lcgtk -I. -I../pyramid-point-renderer/ \
	-I../pyramid-point-renderer/pyramid_point_renderer -I../pyramid-point-renderer/pyramid_point_renderer_texture\
	-I../pyramid-point-renderer/pyramid_point_renderer_color \
	-I../pyramid-point-renderer/pyramid_triangle_renderer \
	-I../pyramid-point-renderer/triangle_renderer \
	-I../pyramid-point-renderer/pyramid_templates \
	-I../pyramid-point-renderer/pyramid_lod -I../pyramid-point-renderer/pyramid_trees \
	-I../pyramid-point-renderer/ellipse_rasterization -I../pyramid-point-renderer/ewa_surface_splatting \
	-I../pyramid-point-renderer/jfa_splatting -I../pyramid-point-renderer/point_ids

LIBS     = -L../lcgtk/glslKernel/ -lglslKernel -lopengl32 -lglu32 -lglut32
#LIBS     = -L../lcgtk/glslKernel/ -lglslKernel -lglut -lGL -lGLU

OBJS     = main.o \
	paintCursor.o \
	colorBuffer.o \
	../pyramid-point-renderer/application.o \
	../pyramid-point-renderer/camera.o \
	../pyramid-point-renderer/ellipse_rasterization.o \
	../pyramid-point-renderer/ewa_surface_splatting.o \
	../pyramid-point-renderer/jfa_splatting.o \
	../pyramid-point-renderer/object.o \
	../pyramid-point-renderer/ply.o \
	../pyramid-point-renderer/point_based_renderer.o \
	../pyramid-point-renderer/point_ids.o \
	../pyramid-point-renderer/primitives.o \
	../pyramid-point-renderer/pyramid_point_renderer.o \
	../pyramid-point-renderer/pyramid_point_renderer_color.o \
	../pyramid-point-renderer/pyramid_point_renderer_texture.o \
	../pyramid-point-renderer/pyramid_point_renderer_er.o \
	../pyramid-point-renderer/pyramid_point_renderer_lod.o \
	../pyramid-point-renderer/pyramid_point_renderer_trees.o \
	../pyramid-point-renderer/pyramid_triangle_renderer.o \
	../pyramid-point-renderer/surfels.o \
	../pyramid-point-renderer/timer.o \
	../pyramid-point-renderer/triangle_renderer.o

first: $(OBJS)
	@echo "Linking ...."
	$(CXX) -o ../pyramid-point-renderer/$(NAME) $^ $(LIBS)
	@echo "Done !!!"

.cpp.o: $*.h
	@echo "Compiling C++ code ...."
	$(CXX) $(FLAGS) -c $*.cpp $(PATHINC)

.cc.o: $*.h
	@echo "Compiling C++ code ...."
	$(CXX) $(FLAGS) -c $*.cc $(PATHINC)

.c.o: $*.h
	@echo "Compiling C++ code ...."
	$(CC) $(FLAGS) -c $*.c $(PATHINC)

clean:
	rm -f *.o *~ .depend

all: first

#NAME     = pyramid-point-renderer-glut

#SRC      = $(OBJ:.o=.cc)

#CXXFLAGS = -O3

#INCPATH  = -Ilcgtk/glslKernel -Ilcgtk -I.

#LIBS     = -lGLU -lGL -lglut -Llcgtk/glslKernel/ -lglslKernel
#LIBS    = -lglu32 -lopengl32 -lglut32

#first: $(OBJS)
#	$(CXX) $(CXXFLAGS) $(INCPATH) -o $(NAME) $(OBJS) $(LIBS)

#clean:
#	rm -f *.o *~ .depend

#all: clean first
